<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      background-color: aqua;
      width: 22px;
      /* height: 80%; */
      position: fixed;
      right: 20px;
      /* top:???;
      top: 50%;
      transform: translateY(-50%); */
      top: 10%;
      bottom: 10%;
    }

    .mark {
      background-color: rgba(0, 0, 0, 0.3);
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      position: fixed;
    }
  </style>
</head>

<body>
  <div class="box"></div>
  <div class="mark"></div>
</body>

</html>